package com.pentofab.payrollmanagement.dao.model;

import java.util.ArrayList;


public class UserAccountsDetail {
	
	private String userName;
	private String activeTill;
	private String createdBy;
	private String createionDate;
	
	
	
	private UserAccountsDetail(String uName,String actTill,String creDate,String creBy){

		userName = uName;
		activeTill =actTill;
		createdBy = creBy;
		createionDate = creDate;
	}
	
	
public static ArrayList<UserAccountsDetail> getUserAccDetailList(ArrayList<UserAccounts> userAccountsList) {
		
		ArrayList<UserAccountsDetail> detail = new ArrayList<UserAccountsDetail>();
		for (int i = 0; i < userAccountsList.size(); i++) {
			UserAccounts cur = userAccountsList.get(i);
			detail.add(new UserAccountsDetail(cur.getUsername(),cur.getValidity(),cur.getCreationdate(),cur.getCreatedby()));
		}

		return detail;

	}
	
	
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getActiveTill() {
		return activeTill;
	}


	public void setActiveTill(String activeTill) {
		this.activeTill = activeTill;
	}


	public String getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}
	public String getCreateionDate() {
		return createionDate;
	}
	public void setCreateionDate(String createionDate) {
		this.createionDate = createionDate;
	}


	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "UserAccountsDetail ( "
	        + super.toString() + TAB
	        + "userName = " + this.userName + TAB
	        + "activeTill = " + this.activeTill + TAB
	        + "createdBy = " + this.createdBy + TAB
	        + "createionDate = " + this.createionDate + TAB
	        + " )";
	
	    return retValue;
	}
	

}
